home *** CD-ROM | disk | FTP | other *** search
- *****************************************************************************
- * PROGRAM: Search.wfm
- *
- * WRITTEN BY: Borland Samples Group
- *
- * DATE: 5/93
- *
- * UPDATED: 6/95
- *
- * REVISION: $Revision: 1.36 $
- *
- * VERSION: Visual dBASE
- *
- * DESCRIPTION: This form executes a simple search. It will accept a value
- * and search for it using the current index. It allows the
- * calling program to handle the results. The entered value
- * is attached to the OkButton, so the calling program can
- * search for it in whatever way it needs.
- *
- * PARAMETERS: None
- *
- * CALLS: Buttons.cc (Custom Controls file)
- *
- * USAGE: DO Search.wfm
- * or
- * (this is how Search is called from Orders.mnu and Customer.mnu)
- * set procedure to Search.wfm additive
- * local f
- * f = new SearchForm()
- * f.mdi = .F. && modal forms cannot be mdi
- * selected = f.ReadModal()
- * seek f.value
- *
- *******************************************************************************
- #include <Messdlg.h>
- set ldCheck off
- ** END HEADER -- do not remove this line*
- * Generated on 06/15/95
- *
- parameter bModal
- local f
- f = new SEARCHFORM()
- if (bModal)
- f.mdi = .F. && ensure not MDI
- f.ReadModal()
- else
- f.Open()
- endif
- CLASS SEARCHFORM OF SearchFormClass From "SAMPLE.CFM"
- this.Left = 33.333
- this.Top = 4
- this.Height = 4.6875
- this.Width = 36.833
- this.OnOpen = CLASS::FORM_ONOPEN
- this.OnClose = CLASS::FORM_ONCLOSE
- this.OnSelection = CLASS::FORM_ONSELECTION
-
-
- procedure Form_OnOpen
- ****************************************************************************
- set procedure to &_dbwinhome.samples\Sampproc.prg additive
- && if Search was called from customer/
- if type("this.keyName") <> "U" && orders with the keyName property assigned
- this.text = FormatStr("Search -- %1", this.keyName)
- this.searchEntry.picture = this.formatting
- endif
- this.searchEntry.SetFocus()
-
-
- ****************************************************************************
-
- procedure Form_OnClose
- ****************************************************************************
-
- close procedure &_dbwinhome.samples\Buttons.cc,;
- &_dbwinhome.samples\Sampproc.prg
-
-
- ****************************************************************************
-
- procedure Form_OnSelection(controlId)
-
- * If value was specified, save it and close form.
- ****************************************************************************
-
- if controlId <> 0 && If Cancel wasn't selected
- form.value = form.searchEntry.value
- endif
- form.Close()
-
-
- ENDCLASS
-
-
-
-
-
-
-
-
-
-